| Conditions | 1 |
| Paths | 1 |
| Total Lines | 272 |
| Code Lines | 258 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
Small methods make your code easier to understand, in particular if combined with a good name. Besides, if your method is small, finding a good name is usually much easier.
For example, if you find yourself adding comments to a method's body, this is usually a good sign to extract the commented part to a new method, and use the comment as a starting point when coming up with a good name for this new method.
Commonly applied refactorings include:
If many parameters/temporary variables are present:
| 1 | /* |
||
| 392 | TalentCloudAPI.Content = function (response) {
|
||
| 393 | var data = JSON.parse(response); |
||
| 394 | var content = data.content; |
||
| 395 | |||
| 396 | // Navigation Links |
||
| 397 | this.navigationLoginLink = content.navigationLoginLink; |
||
| 398 | this.navigationLogoutLink = content.navigationLogoutLink; |
||
| 399 | this.navigationRegisterLink = content.navigationRegisterLink; |
||
| 400 | this.navigationHomeLink = content.navigationHomeLink; |
||
| 401 | this.navigationProfileLink = content.navigationProfileLink; |
||
| 402 | this.navigationBrowseLink = content.navigationBrowseLink; |
||
| 403 | this.navigationDashboardLink = content.navigationDashboardLink; |
||
| 404 | this.navigationPosterLink = content.navigationPosterLink; |
||
| 405 | // Subpage Titles |
||
| 406 | this.browseHeroTitle = content.browseHeroTitle; |
||
| 407 | this.dashboardHeroTitle = content.dashboardHeroTitle; |
||
| 408 | this.profileHeroTitle = content.profileHeroTitle; |
||
| 409 | this.applicationHeroTitle = content.applicationHeroTitle; |
||
| 410 | this.managerProfileHeroTitle = content.managerProfileHeroTitle; |
||
| 411 | this.posterHeroTitle = content.posterHeroTitle; |
||
| 412 | this.faqHeroTitle = content.faqHeroTitle; |
||
| 413 | // Job Poster Content |
||
| 414 | this.jobPosterSubnavLabel = content.jobPosterSubnavLabel; |
||
| 415 | this.jobPosterSubnavItemBasics = content.jobPosterSubnavItemBasics; |
||
| 416 | this.jobPosterSubnavItemImpact = content.jobPosterSubnavItemImpact; |
||
| 417 | this.jobPosterSubnavItemWork = content.jobPosterSubnavItemWork; |
||
| 418 | this.jobPosterSubnavItemCriteria = content.jobPosterSubnavItemCriteria; |
||
| 419 | this.jobPosterSubnavItemCulture = content.jobPosterSubnavItemCulture; |
||
| 420 | this.jobPosterSubnavItemKnow = content.jobPosterSubnavItemKnow; |
||
| 421 | this.jobPosterSubnavItemApply = content.jobPosterSubnavItemApply; |
||
| 422 | this.jobPosterContentTitleBasics = content.jobPosterContentTitleBasics; |
||
| 423 | this.jobPosterContentTitleImpact = content.jobPosterContentTitleImpact; |
||
| 424 | this.jobPosterContentTitleWork = content.jobPosterContentTitleWork; |
||
| 425 | this.jobPosterContentTitleCriteria = content.jobPosterContentTitleCriteria; |
||
| 426 | this.jobPosterContentTitleCulture = content.jobPosterContentTitleCulture; |
||
| 427 | this.jobPosterContentTitleKnow = content.jobPosterContentTitleKnow; |
||
| 428 | this.jobPosterContentTitleApply = content.jobPosterContentTitleApply; |
||
| 429 | this.jobPosterTimeRemaining = content.jobPosterTimeRemaining; |
||
| 430 | // Job Application |
||
| 431 | this.essentialCriteria = content.essentialCriteria; |
||
| 432 | this.assetCriteria = content.assetCriteria; |
||
| 433 | this.microReference = content.microReference; |
||
| 434 | this.skillSample = content.skillSample; |
||
| 435 | this.applicationPositionLabel = content.applicationPositionLabel; |
||
| 436 | |||
| 437 | // Evidence - QF |
||
| 438 | this.applicantionProgressInformationAssessment = content.applicantionProgressInformationAssessment; |
||
| 439 | this.applicationEvidenceExpertiseItemLabel = content.applicationEvidenceExpertiseItemLabel; |
||
| 440 | this.applicationProgressMyYearsOfExperience = content.applicationProgressMyYearsOfExperience; |
||
| 441 | |||
| 442 | // Job Application Progress Tracking - QF |
||
| 443 | this.applicationProgressMyInformation = content.applicationProgressMyInformation; |
||
| 444 | this.applicationProgressEssentialCriteria = content.applicationProgressEssentialCriteria; |
||
| 445 | this.applicationProgressNonEssentialCriteria = content.applicationProgressNonEssentialCriteria; |
||
| 446 | this.applicationProgressReviewMyApplication = content.applicationProgressReviewMyApplication; |
||
| 447 | |||
| 448 | // Application Preview |
||
| 449 | this.editApplication = content.editApplication; |
||
| 450 | this.applicationPreviewProfilePhotoTitle = content.applicationPreviewProfilePhotoTitle; |
||
| 451 | this.applicationPreviewProfileAlert = content.applicationPreviewProfileAlert; |
||
| 452 | this.applicationPreviewDeclarationStoryTitle = content.applicationPreviewDeclarationStoryTitle; |
||
| 453 | this.applicationPreviewMicroReferenceTitle = content.applicationPreviewMicroReferenceTitle; |
||
| 454 | this.applicationPreviewReferenceMissing = content.applicationPreviewReferenceMissing; |
||
| 455 | this.applicationPreviewSkillSampleStoryLabel = content.applicationPreviewSkillSampleStoryLabel; |
||
| 456 | this.applicationPreviewSkillSampleLink = content.applicationPreviewSkillSampleLink; |
||
| 457 | this.applicationPreviewSkillSampleMissing = content.applicationPreviewSkillSampleMissing; |
||
| 458 | |||
| 459 | // Others |
||
| 460 | this.title = content.title; |
||
| 461 | this.helpLearn = content.helpLearn; |
||
| 462 | this.languageSelect = content.languageSelect; |
||
| 463 | this.applyNow = content.applyNow; |
||
| 464 | this.jobPostersLink = content.jobPostersLink; |
||
| 465 | this.teamsLink = content.teamsLink; |
||
| 466 | this.jobNumber = content.jobNumber; |
||
| 467 | this.jobTitle = content.jobTitle; |
||
| 468 | this.jobLocation = content.jobLocation; |
||
| 469 | this.jobCity = content.jobCity; |
||
| 470 | this.jobProvince = content.jobProvince; |
||
| 471 | this.jobApplicantsSoFar = content.jobApplicantsSoFar; |
||
| 472 | this.jobUnitsToCloseHours = content.jobUnitsToCloseHours; |
||
| 473 | this.jobUnitsToCloseDays = content.jobUnitsToCloseDays; |
||
| 474 | this.jobUnitsToCloseMonths = content.jobUnitsToCloseMonths; |
||
| 475 | this.jobUntilClose = content.jobUntilClose; |
||
| 476 | this.jobTerm = content.jobTerm; |
||
| 477 | this.viewButton = content.viewButton; |
||
| 478 | this.jobSalaryRange = content.jobSalaryRange; |
||
| 479 | this.submitApplication = content.submitApplication; |
||
| 480 | this.step1 = content.step1; |
||
| 481 | this.step2 = content.step2; |
||
| 482 | this.step3 = content.step3; |
||
| 483 | this.review = content.review; |
||
| 484 | this.goToStep2 = content.goToStep2; |
||
| 485 | this.goToStep1 = content.goToStep1; |
||
| 486 | this.goToStep3 = content.goToStep3; |
||
| 487 | this.goToReview = content.goToReview; |
||
| 488 | this.createJobPosterWindowTitle = content.createJobPosterWindowTitle; |
||
| 489 | this.createProfileWindowTitle = content.createProfileWindowTitle; |
||
| 490 | this.required = content.required; |
||
| 491 | this.submit = content.submit; |
||
| 492 | this.generalInformation = content.generalInformation; |
||
| 493 | this.aboutMe = content.aboutMe; |
||
| 494 | this.aLittleBitAboutMe = content.aLittleBitAboutMe; |
||
| 495 | this.whatImMostProudOfInCareer = content.whatImMostProudOfInCareer; |
||
| 496 | this.position = content.position; |
||
| 497 | this.department = content.department; |
||
| 498 | this.branch = content.branch; |
||
| 499 | this.division = content.division; |
||
| 500 | this.leadershipStyle = content.leadershipStyle; |
||
| 501 | this.myLeadershipStyle = content.myLeadershipStyle; |
||
| 502 | this.myApproachToEmployee = content.myApproachToEmployee; |
||
| 503 | this.myExpectationsOfEmployees = content.myExpectationsOfEmployees; |
||
| 504 | this.myApproachToDecisionMaking = content.myApproachToDecisionMaking; |
||
| 505 | this.workExperience = content.workExperience; |
||
| 506 | this.education = content.education; |
||
| 507 | this.howOftenDoYouReview = content.howOftenDoYouReview; |
||
| 508 | this.howOftenDoYouStayLate = content.howOftenDoYouStayLate; |
||
| 509 | this.howOftenDoYouEngage = content.howOftenDoYouEngage; |
||
| 510 | this.howOftenDoYouApproveDevelopment = content.howOftenDoYouApproveDevelopment; |
||
| 511 | this.almostNever = content.almostNever; |
||
| 512 | this.rarely = content.rarely; |
||
| 513 | this.sometimes = content.sometimes; |
||
| 514 | this.usually = content.usually; |
||
| 515 | this.almostAlways = content.almostAlways; |
||
| 516 | this.name = content.name; |
||
| 517 | this.gctc = content.gctc; |
||
| 518 | this.at = content.at; |
||
| 519 | this.readMore = content.readMore; |
||
| 520 | this.canadaLink = content.canadaLink; |
||
| 521 | this.canadaLinkHref = content.canadaLinkHref; |
||
| 522 | this.taglineMain = content.taglineMain; |
||
| 523 | this.taglineSecondary = content.taglineSecondary; |
||
| 524 | this.taglineTertiary = content.taglineTertiary; |
||
| 525 | this.howItWorksHeading = content.howItWorksHeading; |
||
| 526 | this.howItWorksLead = content.howItWorksLead; |
||
| 527 | this.logoSrc = content.logoSrc; |
||
| 528 | this.ownYourStory = content.ownYourStory; |
||
| 529 | this.ownYourStoryText = content.ownYourStoryText; |
||
| 530 | this.getFound = content.getFound; |
||
| 531 | this.getFoundText = content.getFoundText; |
||
| 532 | this.contribute = content.contribute; |
||
| 533 | this.contributeText = content.contributeText; |
||
| 534 | this.howItWorksLeadOut = content.howItWorksLeadOut; |
||
| 535 | this.howItWorksLast = content.howItWorksLast; |
||
| 536 | this.contactUs = content.contactUs; |
||
| 537 | this.transcript = content.transcript; |
||
| 538 | this.ourTeam = content.ourTeam; |
||
| 539 | this.ourTeamText = content.ourTeamText; |
||
| 540 | this.browseTitle = content.browseTitle; |
||
| 541 | this.createJobApplicationWindowTitle = content.createJobApplicationWindowTitle; |
||
| 542 | this.createJobApplicationJobTitleLabel = content.createJobApplicationJobTitleLabel; |
||
| 543 | this.createJobApplicationConfirmationPositionLabel = content.createJobApplicationConfirmationPositionLabel; |
||
| 544 | this.jobApplicationConfirmationTrackingReminder = content.jobApplicationConfirmationTrackingReminder; |
||
| 545 | this.continueToDashboard = content.continueToDashboard; |
||
| 546 | this.announcement = content.announcement; |
||
| 547 | this.adminPortal = content.adminPortal; |
||
| 548 | this.applicantPortal = content.applicantPortal; |
||
| 549 | this.yourApplicationsTitle = content.yourApplicationsTitle; |
||
| 550 | this.workEnvironment = content.workEnvironment; |
||
| 551 | this.remoteLocationAllowed = content.remoteLocationAllowed; |
||
| 552 | this.teleworkAllowed = content.teleworkAllowed; |
||
| 553 | this.flexHoursAllowed = content.flexHoursAllowed; |
||
| 554 | this.yes = content.yes; |
||
| 555 | this.no = content.no; |
||
| 556 | this.physicalEnvironment = content.physicalEnvironment; |
||
| 557 | this.teamCulture = content.teamCulture; |
||
| 558 | this.teamSize = content.teamSize; |
||
| 559 | this.gcDirectoryLink = content.gcDirectoryLink; |
||
| 560 | this.teamSizePrompt = content.teamSizePrompt; |
||
| 561 | this.gcDirectoryLinkPrompt = content.gcDirectoryLinkPrompt; |
||
| 562 | this.teamNarrativePrompt = content.teamNarrativePrompt; |
||
| 563 | this.adminTagline = content.adminTagline; |
||
| 564 | this.adminAboutMe = content.adminAboutMe; |
||
| 565 | this.adminProfilePositionLabel = content.adminProfilePositionLabel; |
||
| 566 | this.adminProfileDepartmentLabel = content.adminProfileDepartmentLabel; |
||
| 567 | this.adminProfileBranchLabel = content.adminProfileBranchLabel; |
||
| 568 | this.jobReferenceId = content.jobReferenceId; |
||
| 569 | this.openEndedQuestions = content.openEndedQuestions; |
||
| 570 | this.skipNavText = content.skipNavtext; |
||
| 571 | this.managerProfile_review_option0 = content.managerProfile_review_option0; |
||
| 572 | this.managerProfile_review_option1 = content.managerProfile_review_option1; |
||
| 573 | this.managerProfile_review_option2 = content.managerProfile_review_option2; |
||
| 574 | this.managerProfile_review_option3 = content.managerProfile_review_option3; |
||
| 575 | this.managerProfile_review_option4 = content.managerProfile_review_option4; |
||
| 576 | this.managerProfile_stayLate_option0 = content.managerProfile_stayLate_option0; |
||
| 577 | this.managerProfile_stayLate_option1 = content.managerProfile_stayLate_option1; |
||
| 578 | this.managerProfile_stayLate_option2 = content.managerProfile_stayLate_option2; |
||
| 579 | this.managerProfile_stayLate_option3 = content.managerProfile_stayLate_option3; |
||
| 580 | this.managerProfile_stayLate_option4 = content.managerProfile_stayLate_option4; |
||
| 581 | this.managerProfile_engagement_option0 = content.managerProfile_engagement_option0; |
||
| 582 | this.managerProfile_engagement_option1 = content.managerProfile_engagement_option1; |
||
| 583 | this.managerProfile_engagement_option2 = content.managerProfile_engagement_option2; |
||
| 584 | this.managerProfile_engagement_option3 = content.managerProfile_engagement_option3; |
||
| 585 | this.managerProfile_engagement_option4 = content.managerProfile_engagement_option4; |
||
| 586 | this.managerProfile_developmentOpportunities_option0 = content.managerProfile_developmentOpportunities_option0; |
||
| 587 | this.managerProfile_developmentOpportunities_option1 = content.managerProfile_developmentOpportunities_option1; |
||
| 588 | this.managerProfile_developmentOpportunities_option2 = content.managerProfile_developmentOpportunities_option2; |
||
| 589 | this.managerProfile_developmentOpportunities_option3 = content.managerProfile_developmentOpportunities_option3; |
||
| 590 | this.managerProfile_developmentOpportunities_option4 = content.managerProfile_developmentOpportunities_option4; |
||
| 591 | this.managerProfile_acceptLowValueWorkRequests_option0 = content.managerProfile_acceptLowValueWorkRequests_option0; |
||
| 592 | this.managerProfile_acceptLowValueWorkRequests_option1 = content.managerProfile_acceptLowValueWorkRequests_option1; |
||
| 593 | this.managerProfile_acceptLowValueWorkRequests_option2 = content.managerProfile_acceptLowValueWorkRequests_option2; |
||
| 594 | this.managerProfile_acceptLowValueWorkRequests_option3 = content.managerProfile_acceptLowValueWorkRequests_option3; |
||
| 595 | this.managerProfile_acceptLowValueWorkRequests_option4 = content.managerProfile_acceptLowValueWorkRequests_option4; |
||
| 596 | this.managerDecisions_tipWhatis = content.managerDecisions_tipWhatis; |
||
| 597 | this.managerDecisions_tipSummary = content.managerDecisions_tipSummary; |
||
| 598 | this.profileBasicInfoEditTitle = content.profileBasicInfoEditTitle; |
||
| 599 | this.changeDisplayPic = content.changeDisplayPic; |
||
| 600 | this.updateProfilePhotoTitle = content.updateProfilePhotoTitle; |
||
| 601 | this.updateProfilePhotoDraggableAreaLabel = content.updateProfilePhotoDraggableAreaLabel; |
||
| 602 | this.updateProfilePhotoDraggableAreaErrorSize = content.updateProfilePhotoDraggableAreaErrorSize; |
||
| 603 | this.updateProfilePhotoDraggableAreaErrorType = content.updateProfilePhotoDraggableAreaErrorType; |
||
| 604 | this.updateProfileOrCopy = content.updateProfileOrCopy; |
||
| 605 | this.updateProfileChoosePhotoButtonLabelSpan = content.updateProfileChoosePhotoButtonLabelSpan; |
||
| 606 | this.updateProfileChoosePhotoButton = content.updateProfileChoosePhotoButton; |
||
| 607 | this.updateProfileChooseAltPhotoButtonLabelSpan = content.updateProfileChooseAltPhotoButtonLabelSpan; |
||
| 608 | this.updateProfileChooseAltPhotoButton = content.updateProfileChooseAltPhotoButton; |
||
| 609 | this.updateProfilePhotoCancelButton = content.updateProfilePhotoCancelButton; |
||
| 610 | this.profileBasicInfoEditCancel = content.profileBasicInfoEditCancel; |
||
| 611 | this.updateProfileApplicantProfileFormNameLabelSpan = content.updateProfileApplicantProfileFormNameLabelSpan; |
||
| 612 | this.profileEditName = content.profileEditName; |
||
| 613 | this.updateProfileApplicantProfileFormTaglineLabelSpan = content.updateProfileApplicantProfileFormTaglineLabelSpan; |
||
| 614 | this.profileEditTagline = content.profileEditTagline; |
||
| 615 | this.updateProfileApplicantProfileFormTwitterLabelSpan = content.updateProfileApplicantProfileFormTwitterLabelSpan; |
||
| 616 | this.profileEditTwitter = content.profileEditTwitter; |
||
| 617 | this.updateProfileApplicantProfileFormLinkedinLabelSpan = content.updateProfileApplicantProfileFormLinkedinLabelSpan; |
||
| 618 | this.profileEditLinkedin = content.profileEditLinkedin; |
||
| 619 | this.profileBasicInfoEditCancel = content.profileBasicInfoEditCancel; |
||
| 620 | this.profileBasicInfoEditSave = content.profileBasicInfoEditSave; |
||
| 621 | this.profilePicUploadBtn = content.profilePicUploadBtn; |
||
| 622 | this.loginFormTitle = content.loginFormTitle; |
||
| 623 | this.loginModalCopySpan = content.loginModalCopySpan; |
||
| 624 | this.switchToRegister = content.switchToRegister; |
||
| 625 | this.loginModalEmailLabelSpan = content.loginModalEmailLabelSpan; |
||
| 626 | this.login_email = content.login_email; |
||
| 627 | this.loginModalPasswordLabelSpan = content.loginModalPasswordLabelSpan; |
||
| 628 | this.login_password = content.login_password; |
||
| 629 | this.loginFormCancelBtn = content.loginFormCancelBtn; |
||
| 630 | this.loginFormLoginBtn = content.loginFormLoginBtn; |
||
| 631 | this.registerFormTitle = content.registerFormTitle; |
||
| 632 | this.profileAboutMeEditTitle = content.profileAboutMeEditTitle; |
||
| 633 | this.updateAboutTextareaLabelSpan = content.updateAboutTextareaLabelSpan; |
||
| 634 | this.profileEditAboutMe = content.profileEditAboutMe; |
||
| 635 | this.profileAboutMeEditCancel = content.profileAboutMeEditCancel; |
||
| 636 | this.profileAboutMeEditSave = content.profileAboutMeEditSave; |
||
| 637 | this.managerDecisions_tipWhatis = content.managerDecisions_tipWhatis; |
||
| 638 | this.managerDecisions_tipSummary = content.managerDecisions_tipSummary; |
||
| 639 | this.accommodationTextStart = content.accommodationTextStart; |
||
| 640 | this.accommodationTextEnd = content.accommodationTextEnd; |
||
| 641 | this.jobPosterKeyTasksLabel = content.jobPosterKeyTasksLabel; |
||
| 642 | this.jobPosterCoreCompetenciesLabel = content.jobPosterCoreCompetenciesLabel; |
||
| 643 | this.jobPosterDevelopingCompetenciesLabel = content.jobPosterDevelopingCompetenciesLabel; |
||
| 644 | this.jobPosterHiringManagerLabel = content.jobPosterHiringManagerLabel; |
||
| 645 | this.jobPosterClearanceLevelLabel = content.jobPosterClearanceLevelLabel; |
||
| 646 | this.jobPosterStartDateLabel = content.jobPosterStartDateLabel; |
||
| 647 | this.jobPosterJobLevelLabel = content.jobPosterJobLevelLabel; |
||
| 648 | this.jobPosterLanguageLabel = content.jobPosterLanguageLabel; |
||
| 649 | this.jobPosterTermLabel = content.jobPosterTermLabel; |
||
| 650 | this.save = content.save; |
||
| 651 | this.cancel = content.cancel; |
||
| 652 | this.editYour = content.editYour; |
||
| 653 | this.jobPosterTeamNarrativeText_label = content.jobPosterTeamNarrativeText_label; |
||
| 654 | this.jobPosterOperatingContext_label = content.jobPosterOperatingContext_label; |
||
| 655 | this.jobPosterWhatWeValue_label = content.jobPosterWhatWeValue_label; |
||
| 656 | this.jobPosterHowWeWork_label = content.jobPosterHowWeWork_label; |
||
| 657 | this.years = content.years; |
||
| 658 | this.status = content.status; |
||
| 659 | this.jobPosterBackButtonText = content.jobPosterBackButtonText; |
||
| 660 | this.termsAndConditions = content.termsAndConditions; |
||
| 661 | this.privacy = content.privacy; |
||
| 662 | this.jobPosterApplicants = content.jobPosterApplicants; |
||
| 663 | }; |
||
| 664 | |||
| 736 |
This checks looks for references to variables that have not been declared. This is most likey a typographical error or a variable has been renamed.
To learn more about declaring variables in Javascript, see the MDN.